package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.dagger.scope.FragmentScope;
import com.wgts.wgts.mvp.model.IUpgradeShopKeeperFragmentModel;
import com.wgts.wgts.mvp.model.IWgtsProductModel;
import com.wgts.wgts.mvp.model.imp.UpgradeShopKeeperFragmentModel;
import com.wgts.wgts.mvp.model.imp.WgtsProductModel;
import com.wgts.wgts.mvp.presenter.IUpgradeShopKeeperFragmentPresenter;
import com.wgts.wgts.mvp.presenter.imp.UpgradeShopKeeperFragmentPresenter;
import com.wgts.wgts.mvp.view.IUpgradeShopKeeperFragmentView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

@Module
public class UpgradeShopKeeperFragmentModule {
    private IUpgradeShopKeeperFragmentView view;

    public UpgradeShopKeeperFragmentModule(IUpgradeShopKeeperFragmentView view) {
        this.view = view;
    }

    @Provides
    @FragmentScope
    public IUpgradeShopKeeperFragmentView provideView(){
        return view;
    }

    @Provides
    @FragmentScope
    public IUpgradeShopKeeperFragmentModel provideModel(NetService netService){
        return new UpgradeShopKeeperFragmentModel(netService);
    }

    @Provides
    @FragmentScope
    public IWgtsProductModel provideWgtsModel(NetService netService){
        return new WgtsProductModel(netService);
    }

    @Provides
    @FragmentScope
    public IUpgradeShopKeeperFragmentPresenter providePersenter(IUpgradeShopKeeperFragmentModel model, IUpgradeShopKeeperFragmentView view, IWgtsProductModel wgtsProductModel){
        return new UpgradeShopKeeperFragmentPresenter(model, view, wgtsProductModel);
    }
}
